package myapps.ttclient.protocol.message;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;

import myapps.ttclient.GlobalVariables;
import myapps.ttclient.Helper;
import myapps.ttclient.baseclass_and_interface.TTClientMessage;

public class FileDetailsRequestMessage extends TTClientMessage
{
	private String filePath = "";
	
	public FileDetailsRequestMessage(String filePath) {
		this.filePath = filePath;
	}
	
	public static TTClientMessage parse(DataInputStream dis) throws IOException {
		throw new IOException("NotImplemented");
	}
	
	@Override
	public void toDataOutputStream(DataOutputStream dos) throws IOException {
		dos.writeByte(FILE_DETAILS_REQUEST);
		dos.writeInt(GlobalVariables.NO_LENGTH_CODE);

		Helper.WriteStringToDataOutputStream(dos, filePath);
	}
}
